package com.zhehekeji.opsys.api.plugin.wechat.rsp;

import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;

/**
 * @ClassName RedpackRsp
 * @Description TODO
 * @author chenweiliu chenwei.liu@163.com
 * @date 2017-12-22   下午3:04:53
 */
@XmlRootElement(name="xml")
public class RedpackRsp {
	
	/*public static void main(String[] args) throws JAXBException {
		StringBuilder xmlBuilder = new StringBuilder();
		xmlBuilder.append("<xml>")
		.append("<return_code><![CDATA[SUCCESS]]></return_code>")
		.append("<return_msg><![CDATA[发放成功.]]></return_msg>")
		.append("<result_code><![CDATA[SUCCESS]]></result_code>")
		.append("<err_code><![CDATA[0]]></err_code>")
		.append("<err_code_des><![CDATA[发放成功.]]></err_code_des>")
		.append("<mch_billno><![CDATA[0010010404201411170000046545]]></mch_billno>")
		.append("<mch_id>10010404</mch_id>")
		.append("<wxappid><![CDATA[wx6fa7e3bab7e15415]]></wxappid>")
		.append("<re_openid><![CDATA[onqOjjmM1tad-3ROpncN-yUfa6uI]]></re_openid>")
		.append("<total_amount>1</total_amount>")
		.append("</xml>");
		RedpackRsp rsp = (RedpackRsp) XmlUtils.xmlToObject(xmlBuilder.toString(), RedpackRsp.class);
		System.out.println(rsp);
	}*/
	
	public static class Result {
		public static final String RETURN_SUCCESS = "SUCCESS";
		public static final String RESULT_SUCCESS = "SUCCESS";
		public static final String RETURN_FAIL = "FAIL";
		public static final String RESULT_FAIL = "FAIL";
	}
	
	private String returnCode;
	private String returnMsg;
	private String sign;
	private String resultCode;
	private String errCode;
	private String errCodeDes;
	private String mchBillno;
	private String mchid;
	//@XmlElement(name="wxappid")
	private String wxappid;
	private String reOpenid;
	private String totalAmount;
	private String sendListid;
	@XmlElement(name="return_code")
	public String getReturnCode() {
		return returnCode;
	}
	public void setReturnCode(String returnCode) {
		this.returnCode = returnCode;
	}
	@XmlElement(name="return_msg")
	public String getReturnMsg() {
		return returnMsg;
	}
	public void setReturnMsg(String returnMsg) {
		this.returnMsg = returnMsg;
	}
	@XmlElement(name="sign")
	public String getSign() {
		return sign;
	}
	public void setSign(String sign) {
		this.sign = sign;
	}
	@XmlElement(name="result_code")
	public String getResultCode() {
		return resultCode;
	}
	public void setResultCode(String resultCode) {
		this.resultCode = resultCode;
	}
	@XmlElement(name="err_code")
	public String getErrCode() {
		return errCode;
	}
	public void setErrCode(String errCode) {
		this.errCode = errCode;
	}
	@XmlElement(name="err_code_des")
	public String getErrCodeDes() {
		return errCodeDes;
	}
	public void setErrCodeDes(String errCodeDes) {
		this.errCodeDes = errCodeDes;
	}
	@XmlElement(name="mch_billno")
	public String getMchBillno() {
		return mchBillno;
	}
	public void setMchBillno(String mchBillno) {
		this.mchBillno = mchBillno;
	}
	@XmlElement(name="mch_id")
	public String getMchid() {
		return mchid;
	}
	public void setMchid(String mchid) {
		this.mchid = mchid;
	}
	@XmlElement(name="wxappid")
	public String getWxappid() {
		return wxappid;
	}
	public void setWxappid(String wxappid) {
		this.wxappid = wxappid;
	}
	@XmlElement(name="re_openid")
	public String getReOpenid() {
		return reOpenid;
	}
	public void setReOpenid(String reOpenid) {
		this.reOpenid = reOpenid;
	}
	@XmlElement(name="total_amount")
	public String getTotalAmount() {
		return totalAmount;
	}
	public void setTotalAmount(String totalAmount) {
		this.totalAmount = totalAmount;
	}
	@XmlElement(name="send_listid")
	public String getSendListid() {
		return sendListid;
	}
	public void setSendListid(String sendListid) {
		this.sendListid = sendListid;
	}
	@Override
	public String toString() {
		return "RedpackRsp [returnCode=" + returnCode + ", returnMsg="
				+ returnMsg + ", sign=" + sign + ", resultCode=" + resultCode
				+ ", errCode=" + errCode + ", errCodeDes=" + errCodeDes
				+ ", mchBillno=" + mchBillno + ", mchid=" + mchid
				+ ", wxappid=" + wxappid + ", reOpenid=" + reOpenid
				+ ", totalAmount=" + totalAmount + ", sendListid=" + sendListid
				+ ", getReturnCode()=" + getReturnCode() + ", getReturnMsg()="
				+ getReturnMsg() + ", getSign()=" + getSign()
				+ ", getResultCode()=" + getResultCode() + ", getErrCode()="
				+ getErrCode() + ", getErrCodeDes()=" + getErrCodeDes()
				+ ", getMchBillno()=" + getMchBillno() + ", getMchid()="
				+ getMchid() + ", getWxappid()=" + getWxappid()
				+ ", getReOpenid()=" + getReOpenid() + ", getTotalAmount()="
				+ getTotalAmount() + ", getSendListid()=" + getSendListid()
				+ ", toString()=" + super.toString() + "]";
	}
}

